<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
	/**
	 * CodeIgniter
	 *
	 * An open source application development framework for PHP 4.3.2 or newer
	 *
	 * @package		CodeIgniter
	 * @author		ExpressionEngine Dev Team
	 * @copyright	Copyright (c) 2008 - 2009, EllisLab, Inc.
	 * @license		http://codeigniter.com/user_guide/license.html
	 * @link		http://codeigniter.com
	 * @since		Version 1.0
	 * @filesource
	 */
	// ------------------------------------------------------------------------
	
	/**
	 * @package		CodeIgniter
	 * @subpackage	Libraries
	 * @author		AnhDT
	 */
	require_once APP_LIBRARY_PATH . 'tree/paginator/scrolling/st_paginator_scrolling_slider.php';
	class st_paginator_scrolling_elastic extends st_paginator_scrolling_slider {
		public function getPages(st_paginator $_paginator, $_pageRange = null) {
			$_pageRange  = $_paginator->getPageRange();
			$_pageNumber = $_paginator->getCurrentPageNumber();
	
			$originalPageRange = $_pageRange;
			$_pageRange        = $_pageRange * 2 - 1;	
			if ($originalPageRange + $_pageNumber - 1 < $_pageRange) {
				$_pageRange = $originalPageRange + $_pageNumber - 1;
			}
			return parent::getPages($_paginator, $_pageRange);
		}
	}
?>